package br.edu.fanor.esfinge.dao.impl;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import br.edu.fanor.esfinge.dao.DadoProfissionalDAO;
import br.edu.fanor.esfinge.entity.DadoProfissional;

@Stateless(mappedName="ejb/DadoProfissionalDAO")
public class DadoProfissionalDAOImpl implements DadoProfissionalDAO{

	@PersistenceContext
	public EntityManager emr;
	
	@Override
	public DadoProfissional inserir(DadoProfissional dadoprofissional) {
		emr.persist(dadoprofissional);
		return dadoprofissional;
	}

	@Override
	public DadoProfissional buscarId(long id) {
		return emr.find(DadoProfissional.class, id);
	}

	@Override
	public void remover(DadoProfissional dadoprofissional) {
		emr.remove(dadoprofissional);
		
	}

}
